package org.hcyspartnoc.luoxin.common.enums.service;

import lombok.Getter;

@Getter
public enum ServiceCounselorStatusEnum {
    //1: no_pay 2: scheduled, 3: in_progress, 4: completed, 5: cancelled

    NO_PAY(1, "未支付"),
    SCHEDULED(2, "预约成功"),
    IN_PROGRESS(3, "进行中"),
    COMPLETED(4, "已完成"),
    CANCELLED(5, "已取消");


    private final Integer code;
    private final String description;

    ServiceCounselorStatusEnum(Integer code, String description) {
        this.code = code;
        this.description = description;
    }

    public static ServiceCounselorStatusEnum getByCode(Integer code) {
        for (ServiceCounselorStatusEnum theEnum : ServiceCounselorStatusEnum.values()) {
            if (theEnum.getCode().equals(code)) {
                return theEnum;
            }
        }
        return null;
    }
}
